package project.adapter;

import java.util.List;

import project.model.PrComposition;
import project.model.PrProject;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import approve.action.R;

public class ProjectMemberTesterAdapter extends BaseAdapter implements OnClickListener{
	private Context context;
	private List<PrComposition> listMem;
	
	public ProjectMemberTesterAdapter(Context context,List<PrComposition> pr){
		this.context = context;
		this.listMem = pr;
	}
	
	@Override
	public int getCount() {
		return listMem.size();
	}

	@Override
	public Object getItem(int arg0) {
		return listMem.get(arg0);
	}

	@Override
	public long getItemId(int arg0) {
		return arg0;
	}

	@Override
	public View getView(int arg0, View arg1, ViewGroup arg2) {
		PrComposition entry=listMem.get(arg0);
		if(arg1==null){
			LayoutInflater inflater=(LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
			arg1=inflater.inflate(R.layout.adapterlisrerror, null);
		}
		TextView tltMemTest=(TextView)arg1.findViewById(R.id.titleMemberTester);
		tltMemTest.setText(entry.getNameEmployee());
		return arg1;
	}

	@Override
	public void onClick(View arg0) {
		// TODO Auto-generated method stub
		
	}

}
